<form [formGroup]="loginInfo">
  <section class="form-block">
    <div class="form-group row">
      <div class="col-md-2">
        <label for="formFields_1">用户名：</label>
      </div>
      <div class="col-md-6">
        <input class="form-control" type="text" id="formFields_1" formControlName="userName" placeholder="用户名" size="40">
      </div>
    </div>
    <div class="form-group row">
      <div class="col-md-2">
        <label for="formFields_2">密码：</label>
      </div>
      <div class="col-md-6">
        <input class="form-control" type="password" id="formFields_2" formControlName="pwd" placeholder="密码" size="40">
      </div>
    </div>
  </section>
</form>

<button class="btn btn-primary" (click)="login()">登录</button>